package banner

import "strings"

type DefaultFont struct {
	characters map[rune]string
}

func (m *DefaultFont) Show(ban string) string {
	value := ""
	banvals := []rune(ban)
	num := 7
	for i := 0; i < num; i++ {
		for _, v := range banvals {
			font := m.characters[v]
			vals := strings.Split(font, "\n")

			if len(vals) >= num {
				value += vals[i]
			}
		}
		value += "\n"
	}
	return value
}

func (m *DefaultFont) parse() {
	m.characters = make(map[rune]string)
	m.characters['A'] = `
 ________     
|\   __  \    
\ \  \|\  \   
 \ \   __  \  
  \ \  \ \  \ 
   \ \__\ \__\
    \|__|\|__|
              
              
              `
	m.characters['B'] = `
 ________     
|\   __  \    
\ \  \|\ /_   
 \ \   __  \  
  \ \  \|\  \ 
   \ \_______\
    \|_______|
              
              
              `
	m.characters['C'] = `
 ________     
|\   ____\    
\ \  \___|    
 \ \  \       
  \ \  \____  
   \ \_______\
    \|_______|
              
              
              `
	m.characters['D'] = `
 ________     
|\   ___ \    
\ \  \_|\ \   
 \ \  \ \\ \  
  \ \  \_\\ \ 
   \ \_______\
    \|_______|
              
              
              `
	m.characters['E'] = `
 _______      
|\  ___ \     
\ \   __/|    
 \ \  \_|/__  
  \ \  \_|\ \ 
   \ \_______\
    \|_______|
              
              
              `
	m.characters['F'] = `
 ________ 
|\  _____\
\ \  \__/ 
 \ \   __\
  \ \  \_|
   \ \__\ 
    \|__| 
          
          
          `
	m.characters['G'] = `
 ________     
|\   ____\    
\ \  \___|    
 \ \  \  ___  
  \ \  \|\  \ 
   \ \_______\
    \|_______|
              
              
              `
	m.characters['H'] = ` 
 ___  ___     
|\  \|\  \    
\ \  \\\  \   
 \ \   __  \  
  \ \  \ \  \ 
   \ \__\ \__\
    \|__|\|__|
              
              
              `
	m.characters['I'] = `
 ___     
|\  \    
\ \  \   
 \ \  \  
  \ \  \ 
   \ \__\
    \|__|
         
         
         `
	m.characters['J'] = `
	___     
   |\  \    
   \ \  \   
 __ \ \  \  
|\  \\_\  \ 
\ \________\
 \|________|
            
            
            `
	m.characters['K'] = `
 ___  __       
|\  \|\  \     
\ \  \/  /|_   
 \ \   ___  \  
  \ \  \\ \  \ 
   \ \__\\ \__\
    \|__| \|__|
               
               
               `
	m.characters['L'] = `
 ___          
|\  \         
\ \  \        
 \ \  \       
  \ \  \____  
   \ \_______\
    \|_______|
              
              
              `
	m.characters['M'] = `
 _____ ______      
|\   _ \  _   \    
\ \  \\\__\ \  \   
 \ \  \\|__| \  \  
  \ \  \    \ \  \ 
   \ \__\    \ \__\
    \|__|     \|__|
                   
                   
                   `
	m.characters['N'] = `
 ________      
|\   ___  \    
\ \  \\ \  \   
 \ \  \\ \  \  
  \ \  \\ \  \ 
   \ \__\\ \__\
    \|__| \|__|`
	m.characters['O'] = `
 ________     
|\   __  \    
\ \  \|\  \   
 \ \  \\\  \  
  \ \  \\\  \ 
   \ \_______\
    \|_______|
              
              
              `
	m.characters['P'] = `
 ________   
|\   __  \  
\ \  \|\  \ 
 \ \   ____\
  \ \  \___|
   \ \__\   
    \|__|   
            
            
            `
	m.characters['Q'] = `
 ________      
|\   __  \     
\ \  \|\  \    
 \ \  \\\  \   
  \ \  \\\  \  
   \ \_____  \ 
    \|___| \__\
          \|__|
               
               `
	m.characters['R'] = `
________     
|\   __  \    
\ \  \|\  \   
 \ \   _  _\  
  \ \  \\  \| 
   \ \__\\ _\ 
    \|__|\|__|
              
              
              `
	m.characters['S'] = `
 ________      
|\   ____\     
\ \  \___|_    
 \ \_____  \   
  \|____|\  \  
    ____\_\  \ 
   |\_________\
   \|_________|
               
               `
	m.characters['T'] = `
 _________   
|\___   ___\ 
\|___ \  \_| 
     \ \  \  
      \ \  \ 
       \ \__\
        \|__|
             
             
             `
	m.characters['U'] = `
 ___  ___     
|\  \|\  \    
\ \  \\\  \   
 \ \  \\\  \  
  \ \  \\\  \ 
   \ \_______\
    \|_______|
              
              
              `
	m.characters['V'] = `
 ___      ___ 
|\  \    /  /|
\ \  \  /  / /
 \ \  \/  / / 
  \ \    / /  
   \ \__/ /   
    \|__|/    
              
              
              `
	m.characters['W'] = `
 ___       __      
|\  \     |\  \    
\ \  \    \ \  \   
 \ \  \  __\ \  \  
  \ \  \|\__\_\  \ 
   \ \____________\
    \|____________|
                   
                   
                   `
	m.characters['X'] = `
 ___    ___ 
|\  \  /  /|
\ \  \/  / /
 \ \    / / 
  /     \/  
 /  /\   \  
/__/ /\ __\ 
|__|/ \|__| 
            
            `
	m.characters['Y'] = ` 
  ___    ___ 
 |\  \  /  /|
 \ \  \/  / /
  \ \    / / 
   \/  /  /  
 __/  / /    
|\___/ /     
\|___|/      
             
             `
	m.characters['Z'] = `
 ________     
|\_____  \    
 \|___/  /|   
     /  / /   
    /  /_/__  
   |\________\
    \|_______|
              
              
              `
	m.characters['-'] = `               
               
 ____________  
|\____________\
\|____________|
               
               
               
               
               `
	m.characters['?'] = `
  ___ 
 |__ \
   / /
  |_| 
  (_) 
      `
}
